Get Barcode Results
Methods
Properties
Property |
Description |
BarcodeResult |
Gets the string value of the recognized barcode. |
Confidence |
Gets the confidence of the barcode that was recognized. |
BarcodeCodeName |
Gets the name of the recognized barcode. |
BarcodeOrientation |
Gets and sets the orientation of barcodes to search for in recognition. |
BarcodeH |
Gets the height of the image area of the recognized barcode. |
BarcodeW |
Gets the width of the image area of the recognized barcode. |
BarcodeAppendCheckSum |
Gets and sets a value which determines if a checksum value is appended to the barcode during recognition. |
BarcodeResultStyle |
Gets the numeration type of the recognized barcode. |
BarcodeSkew |
Gets the angle of the recognized barcode. |
ChecksumCharCount |
Gets the number of characters in the recognized checksum. |
ChecksumOK |
Gets a check if there is a valid checksum value for the recognized barcode. |
NumBarcodes |
Gets the number of barcodes recognized. |
Order of Results
Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.
-
First, the confidence factor is used to sort the barcode results from highest confidence to lowest. The
Confidence property gets the confidence of the barcode that was recognized.
-
Next, for any barcodes with the same confidence, they will then be sorted by their location, from top to bottom, then left to right.
VB - Example code to get multiple barcode results (in an array) |
Copy Code |
'Sort the results top to bottom
Dim BarcodeArray() As BarcodeInfo
Redim BarcodeArray(0 To BarcodeXpress1.NumBarcodes - 1)
' fill the user type array
For i = 0 To BarcodeXpress1.NumBarcodes - 1
BarcodeXpress1.GetBarcode i
BarcodeArray(i).CodeName = BarcodeXpress1.BarcodeCodeName
BarcodeArray(i).result = BarcodeXpress1.BarcodeResult
BarcodeArray(i).CheckSumOK = BarcodeXpress1.CheckSumOK
BarcodeArray(i).Confidence = BarcodeXpress1.Confidence
BarcodeArray(i).Length = BarcodeXpress1.ResultLen
BarcodeArray(i).X = BarcodeXpress1.BarcodeX
BarcodeArray(i).Y = BarcodeXpress1.BarcodeY
BarcodeArray(i).H = BarcodeXpress1.BarcodeH
BarcodeArray(i).W = BarcodeXpress1.BarcodeW
Next i
' actual sort results top to bottom
Dim temp As BarcodeInfo
For i = Ubound(BarcodeArray) - 1 To 0 Step -1
For j = 0 To i
If BarcodeArray(j).Y > BarcodeArray(j + 1).Y Then
temp = BarcodeArray(j + 1)
BarcodeArray(j + 1) = BarcodeArray(j)
BarcodeArray(j) = temp
End If
Next
Next
|
See the Overview of Barcode Xpress topic for code examples on recognition results.
See Also